package com.tengju.bff.interfaces.manage.member.resource.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "AddResourceForm", description = "添加资源请求参数")
public class AddResourceForm {

    @ApiModelProperty(value = "标题")
    @NotNull(message = "标题不能为空")
    private String title;

    @ApiModelProperty(value = "位置 1：APP首页轮播")
    @NotNull(message = "位置不能为空")
    private Integer position;

    @ApiModelProperty(value = "图片url")
    @NotNull(message = "图片url不能为空")
    private String imgUrl;

    @ApiModelProperty(value = "跳转链接")
    @NotNull(message = "跳转链接不能为空")
    private String jumpUrl;

    @ApiModelProperty(value = "开始时间")
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime beginTime;

    @ApiModelProperty(value = "结束时间")
    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "用户定向 1：普通用户 2：城市服务商1星 3：城市服务商2星 4：城市服务商3星 5：城市服务商4星 6：运营商EC 7：运营商SEC 8：运营商EEC")
    @NotNull(message = "用户定向不能为空")
    private List<Integer> userOrientation;

    @ApiModelProperty(value = "优先级")
    @NotNull(message = "优先级不能为空")
    private Integer priority;
}
